package controller

import (
	"fmt"
	"github.com/gofiber/fiber/v2"
	"github.com/robfig/cron/v3"
	"guns-excel/internal/pkg/util/result"
)

// 新增定时任务
func AddCronJob(ctx *fiber.Ctx) error {
	c := cron.New()
	c.AddFunc("* * * * * ? *", func() {
		fmt.Println("1231231")
	})
	c.Start()
	return ctx.JSON(result.OK)
}
